<template>
  <div>
    <p>
      全选<input type="checkbox" v-model="xcv" @click="qx()">
    </p>
    <div class="about">
    <div class="as" v-for="item in list" :key="item.id">
      <img :src="item.pic" alt="">
        <p>{{item.name}}</p>
        <p>￥{{item.minPrice*item.num}}</p>
        <p>数量：{{item.num}}</p>
        <input type="checkbox" v-model="item.buy">
    </div>
  </div>
  </div>
</template>

<script>
import { mapMutations, mapState } from "vuex";
export default{
  data() {
    return {
      xcv: true,
    };
  },
  methods: {
    ...mapMutations(['qx']),
   
  },
  computed:{
    ...mapState(['list'])
  }
}
</script>
<style>
.about{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  text-align: center;
}
.as{
  /* background: blueviolet; */
  width: 30vw;
}
img{
  width: 300px;
  height: 300px;
}
</style>